from dajaxice.core import dajaxice_autodiscover
from django.conf import settings
from django.conf.urls.defaults import patterns, include

# Dajaxice
dajaxice_autodiscover()

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    (r'^test_dajaxice/$', 'lmcreator.views.test_dajaxice'),
    (r'^test_dajax/$', 'lmcreator.views.test_dajax'),
    (r'^%s/' % settings.DAJAXICE_MEDIA_PREFIX, include('dajaxice.urls')),
)

# if on a development machine
if hasattr(settings, 'STATIC_FILE_LOCATION'):
    urlpatterns += patterns('',
        (r'^static/(?P<path>.*)$',
        'django.views.static.serve',
        {'document_root':
        settings.STATIC_FILE_LOCATION}),
    )
